<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

    <body>
        <script>
            let score = [];
            score.length = 5;
            let max  = 0,min = Infinity,sum = 0;
            alert('请输入小明的各科成绩：');
            for(let i = 0;i < 5;++i){
                score[i] = parseInt(prompt());
                sum += score[i];
                max = Math.max(max,score[i]);
                min = Math.min(min,score[i]);
            }
    
            document.write('5门成绩分别是：'+score[0]+','+score[1]+','+score[2]+","+score[3]+','+score[4]);
            document.write('<br>');
            document.write('总分是：'+sum+'<br>');
            document.write('平均分：'+sum/5+'<br>');
            document.write('最高分：'+max+'<br>');
            document.write('最低分：'+min+'<br>');
        </script>
 
    
</body>
</html>